home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amoszine 3
/
Amoszine 3.adf
/
sticks_ext
/
Sticks.asc
< prev
next >
Wrap
Text File
|
1992-02-26
|
9KB
|
535 lines
TABLE OF CONTENTS
Sticks.lib/Multi Joy
Sticks.lib/Multi Fire
Sticks.lib/Stick Joy
Sticks.lib/Stick Up
Sticks.lib/Stick Down
Sticks.lib/Stick Left
Sticks.lib/Stick Right
Sticks.lib/Stick Fire
Sticks.lib/Stick Scan
Sticks.lib/Stick X
Sticks.lib/Stick Y
Sticks.lib/Mouse X
Sticks.lib/Mouse Y
Sticks.lib/Mouse Button
Sticks.lib/Mouse Clip
Sticks.lib/Mouse Area
Sticks.lib/Multi Joy Sticks.lib/Multi Joy
NAME
state =Multi Joy (jport)
FUNCTION
Reads the joystick and returns in state.
Unlike the original =Joy() command returns information on the state of
four button (using adaptor two buttons with out).
example:
Do
J=Multi Joy(1)
Print Bin$(J)
Loop
you will see that the high bits are for the buttons and the low bits
are for the direction.
INPUTS
jport - which joystick to read.
0 - Reads mouse port
1 - Reads Joystick port
RESULT
State of joystick
76543210
Stick Info : ABCDUDLR
Bit Number meaning
1 Joystick moved up
2 Joystick moved down
4 Joystick moved left
8 Joystick moved right
16 Button D Pressed
32 Button C Pressed
64 Button B Pressed (button on one button joystick)
128 Button A Pressed
BUGS
none known
SEE ALSO
Jleft , Jright , Jup , Jdown (AMOS Manual)
Sticks.lib/Multi Fire Sticks.lib/Multi Fire
NAME
BOOL = Multi Fire (jport,button)
FUNCTION
Tests 'jport' to see if 'Button' has been pressed .
INPUTS
Button - This is the button you want to test
1=A 2=B 3=C 4=D (Start).
jport - which joystick port to read.
this should be either 0 or 1
RESULTS
result is TRUE (-1) if Button is pressed or
FALSE (0) if Button isn't.
BUGS
SEE ALSO
Fire (Amos Manual)
Sticks.lib/Stick Joy Sticks.lib/Stick Joy
NAME
state = Stick Joy(jport)
FUNCTION
Reads the joysticks that are plugged in the serial port
and returns in state.
example:
Do
J=Stick Joy(1)
Print Bin$(J)
Loop
INPUTS
jport - serial joystick port to test.
this is either 0 or 1
RESULTS
1 Joystick moved up
2 Joystick moved down
4 Joystick moved left
8 Joystick moved right
16 Joystick fire1
BUGS
none known
SEE ALSO
Stick Left , Stick Right , Stick Up ,
Stick Down , Stick Fire , Multi Joy and Joy (AMOS MANUAL)
Sticks.lib/Stick Up Sticks.lib/Stick Up
NAME
BOOL = Stick Up(jport)
FUNCTION
Test to see if joystick has been moved up
INPUTS
jport - serial joystick port to read
RESULTS
TRUE if joystick is pushed up.
BUGS
none known
SEE ALSO
Stick Joy,Multi Joy
Sticks.lib/Stick Down Sticks.lib/Stick Down
NAME
BOOL = Stick Down(jport)
FUNCTION
Test to see if joystick has been moved down.
INPUTS
jport - Serial Joystick port to read
RESULTS
TRUE if joystick is pushed down.
BUGS
none known
SEE ALSO
Multi Joy,Stick Joy
Sticks.lib/Stick Left Sticks.lib/Stick Left
NAME
BOOL = Stick Left(jport)
FUNCTION
Test to see if joystick has been moved left.
INPUTS
jport - Serial Joystick port to read
RESULTS
TRUE if joystick is pushed left.
BUGS
none known
SEE ALSO
Multi Joy,Stick Joy
Sticks.lib/Stick Right Sticks.lib/Stick Right
NAME
BOOL = Stick Right(jport)
FUNCTION
Test to see if joystick has been moved Right.
INPUTS
jport - Serial Joystick port to read
RESULTS
TRUE if joystick is pushed Right.
BUGS
none known
SEE ALSO
Multi Joy,Stick Joy
Sticks.lib/Stick Fire Sticks.lib/Stick Fire
NAME
BOOL = Stick Fire(jport)
FUNCTION
Test to see if joystick has been moved fire.
INPUTS
jport - Serial Joystick port to read
RESULTS
TRUE if joystick is pushed fire.
BUGS
I shouldn't really tell you this because you will just go out and try it,
but if you enter =Stick Fire(Jport,button) it will return an error (This
command has been provided so it can be easily updated to handle more
buttons in later version.)
SEE ALSO
Multi Joy,Stick Joy
Sticks.lib/Stick Scan Sticks.lib/Stick Scan
NAME
Stick Scan()
FUNCTION
This is an optomized version of the 'Analog Scan' Function in the Shuffle
extension .
This command scans the analog joysticks to find their current values.
this would normally be done 1 vbl before reading the sticks.
INPUTS
none
RESULTS
none
BUGS
none known
SEE ALSO
Club Newsletter Vol2 Issue2
Sticks.lib/Stick X Sticks.lib/Stick X
NAME
value = Stick X(jport)
FUNCTION
returns the X co-ordinate of the analog stick.
INPUTS
jport - Joystick Port to read.
RESULTS
X co-ordinate (0-255)
BUGS
none known
SEE ALSO
Club Newsletter Vol2 Issue2 , Stick Y
Sticks.lib/Stick Y Sticks.lib/Stick Y
NAME
Stick Y()
value = Stick Y(jport)
FUNCTION
returns the co-ordinate of the analog stick.
INPUTS
jport - Joystick Port to read.
RESULTS
Y co-ordinate (0-255)
BUGS
none known
SEE ALSO
Club Newsletter Vol2 Issue2 , Stick X
Sticks.lib/Mouse X Sticks.lib/Mouse X
NAME
(1) = Mouse X(Mouse Number)
(2) Mouse X Mouse Number,X co-ords
FUNCTION
(1) Reports the current X co-ordinate for the mouse, or sets the
X co-ordinate for the mouse.
(2) Set the X position for the Mouse.
The mouse position is limited to the size set using the Mouse Clip and
defaults to the default screen size.
Note. (1,2) This function does not alter or read the AMOS pointer
position to do so you should use the X Mouse function.
INPUTS
(1) Mouse Number - mouse you want to test (0 - 1)
(2) Mouse Number - mouse to affect.
X co-ord - mouse X position
RESULTS
(1) The X co-ordinate of the mouse.
(2) NO result.
BUGS
In the last manual there was an error with both Mouse X and Mouse Y.
instead of 'Mouse X = value' (as stated) use 'Mouse X Mouse Number,value'
(Sorry)
SEE ALSO
X mouse , Y mouse , Mouse Y , Smouse X , Smouse Y
Sticks.lib/Mouse Y Sticks.lib/Mouse Y
NAME
(1) = Mouse Y(mouse number)
(2) Mouse Y mouse number,Y co-ords
FUNCTION
(1) Reports the current Y co-ordinate for the mouse, or sets the
Y co-ordinate for the mouse.
The mouse position is limited to the size set using the
Mouse House and defaults to the default screen size.
(2) Sets the Y co-ord for the Mouse.
Note. (1,2) This function does not alter or read the AMOS pointer
position to do so you should use the Y Mouse function.
INPUTS
(1) Mouse number - mouse you want to test (0 - 1)
(2) Mouse Number - mouse to affect.
Y co-ords - New position for mouse Y().
RESULTS
(1) The Y co-ordinate of the mouse.
(2) No result.
BUGS
none known.
SEE ALSO
X mouse , Y mouse , Mouse X , Smouse X , Smouse Y
Sticks.lib/Mouse Button Sticks.lib/Mouse Button
NAME
= Mouse Button(jport)
FUNCTION
This function is used to see if any of the mouse buttons are pressed.
INPUTS
jport - Which joystick port to read from
RESULTS
0 No Buttons Pressed
1 Left Button Pressed
2 Right Button Pressed
3 Middle Button Pressed
BUGS
none known
SEE ALSO
Sticks.lib/Mouse Clip Sticks.lib/Mouse Clip
NAME
(1) Mouse Clip Mouse Number,minx,miny To maxx,maxy
(2) Mouse Clip Mouse Number
FUNCTION
(1) This will Limit the mouse to an area on the screen or even beyond the
screen if you want each of the mice can be limited to a different
area and these can overlap as needed.
When you call the Default function all Limits are set back to the
Default screen size.
(2) Sets the Mouse Limit to the current screen size.
INPUTS
(1) Mouse Number - The mouse you want to limit
minx - The left of the box
miny - The top of the box
maxx - The right of the box
maxy - The bottom of the box
(2) Mouse Number - The mouse you want to clip
this will limit the mouse to the current screen size.
RESULTS
(1,2) The mouse cannot move out of the box.
BUGS
SEE ALSO
Smouse Clip
Sticks.lib/Mouse Area Sticks.lib/Mouse Area
NAME
=Mouse Area (Mouse Number)
FUNCTION
This Command will return the Zone the mouse is over.
This function is the same as Mouse Zone in AMOS except Mouse Zone can only
read one mouse.
INPUTS
Mouse Number - Mouse to check for zones.
RESULTS
The zone the mouse is over.
BUGS
No bugs in the command just the old manual. Sorry all ,read above for
how Mouse Area really works.